<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <link rel="icon" id="icon" href="./omg.png">
    <title></title>
  </head>
  <body>
    <div id="app"></div>
    <script type="module" src="/src/main.ts"></script>
  </body>
  <script>

    let favicon = document.getElementById('icon')
    if(location.hostname.includes('omgapi.cc') || location.hostname=='192.168.110.50' || location.hostname=='localhost'){
      document.title='OMG Demo'
      favicon.href = './omg.png'
    }else{
      favicon.href = './gm.png'
      document.title='GM Demo'
    }
    
    // 禁用双指放大
    document.documentElement.addEventListener(
      'touchstart',
      function (event) {
        if (event.touches.length > 1) {
          event.preventDefault()
        }
      },
      {
        passive: false
      }
    )
    // 禁用双击放大
    var lastTouchEnd = 0
    document.documentElement.addEventListener(
      'touchend',
      function (event) {
        var now = Date.now()
        if (now - lastTouchEnd <= 300) {
          event.preventDefault()
        }
        lastTouchEnd = now
      },
      {
        passive: false
      }
    )
  </script>
</html>
